import { GTextFormat } from "../../../../common/GTextFormat";
import { FontUtil } from "../../../../common/font/FontUtil";
import { ChooseItem } from "../../../model/dialog/ChooseItem";
type int = number;
//class QuestionItem
    
    export  class QuestionItem /* flash.display.Sprite */
    {
        constructor()
        {
            
            buttonMode = true;
            mouseChildren = false;
            this._txt = new Object /* flash.text.TextField */();
            this._txt.selectable = false;
            this._txt.multiline = true;
            this._txt.wordWrap = true;
            this._txt.defaultTextFormat = new GTextFormat(FontUtil.songtiName, 12, 65280, null, null, true, null, null, flash.text.TextFormatAlign.LEFT);
            this._txt.width = 270;
            addChild(this._txt);
            return;
        }

        public updateData(arg1: ChooseItem): void
        {
            this._index = arg1.index;
            this._optCode = arg1.optId;
            this._txt.text = this.indexShow[arg1.index] + arg1.info;
            this._txt.height = this._txt.textHeight + 4;
            return;
        }

        public dispose(): void
        {
            return;
        }

        public get index(): string
        {
            return this._index;
        }

        public get optId(): int
        {
            return this._optCode;
        }

        public /* override */ get height(): number
        {
            return this._txt.textHeight + 5;
        }

        /* internal */ /* const */indexShow: Array<any>=["", "a", "b", "c", "d"];

        /* internal */ /* var */_txt: Object /* flash.text.TextField */;

        /* internal */ /* var */_index: string;

        /* internal */ /* var */_optCode: int;
    }
